import 'package:ducafe_ui_core/ducafe_ui_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mes_app/common/index.dart';

class OrderCrad extends StatelessWidget {
  const OrderCrad({super.key, this.headLeftWidget, this.headRightWidget, this.contentWidget});

  final Widget? headLeftWidget;
  final Widget? headRightWidget;
  final Widget? contentWidget;

  @override
  Widget build(BuildContext context) {
    return <Widget>[
      <Widget>[
        if(headLeftWidget != null) headLeftWidget!,
        if(headRightWidget != null) headRightWidget!,
      ].toRow(mainAxisAlignment: MainAxisAlignment.spaceBetween).paddingHorizontal(AppSpace.card),
      Divider(color: context.colors.scheme.secondary,),
      Container(child: contentWidget,).paddingVertical(3.w).paddingHorizontal(AppSpace.card),
    ].toColumn(crossAxisAlignment: CrossAxisAlignment.start).paddingVertical(AppSpace.card).card();
  }
}
